package com.pad.dpscn.daag.sdk.common.exception;
import com.pad.dpscn.daag.sdk.common.enums.ErrorCodeEnum;

/**
 * 自定义异常类
 */
public class DaagException extends RuntimeException{
    private static final long serialVersionUID = 2301560468004630203L;

    private String errMsg;

    private String errCode;

    public DaagException(String message) {
        super(message);
    }

    public DaagException(String errMsg, String errCode) {
        super(errMsg);
        this.errCode = errCode;
        this.errMsg = errMsg;
    }

    public DaagException(ErrorCodeEnum errorCodeEnum) {
        super(errorCodeEnum.getMsg());
        this.errMsg = errorCodeEnum.getMsg();
        this.errCode = errorCodeEnum.getCode();
    }

    public String getErrMsg() {
        return errMsg;
    }

    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }

    public String getErrCode() {
        return errCode;
    }

    public void setErrCode(String errCode) {
        this.errCode = errCode;
    }

}
